const before = (to, from, next, route) => {
    if (to.matched.length === 0) { //匹配前往的路由不存在
        route.replace({name:'404'});
        return;
    }
    //console.log(from)
    next()
}
export default before